<div class="comments-wrap">

    <!--内容展示区域 START-->
    <ol class="commentlist" id="show-content">
        <if condition="$Counts">
            <h3 class="comment-reply-title show-h3 alert alert-success" style="padding: 12px;font-size: 18px;margin: 0;text-align: center" id="count-conment" value="{$Counts}"><i class="icon-xixi"></i><span style="margin-left: 3px;" id="show-commentCount">共 {$Counts} 条评论</span></h3>
            <else/>
            <h3 class="comment-reply-title show-h3 alert alert-success" style="padding: 10px;font-size: 14px;margin: 0;" id="count-conment" value="0"><i class="icon-xixi"></i><span style="margin-left: 3px;" id="show-commentCount">暂无评论,赶紧发表你的见解吧.^_^ </span></h3>
        </if>

        <foreach name="CommentData" item="v">
            <li id="comment-{$v['id']}" class="comment">
                <article id="div-comment-{$v['id']}" class="comment-body">
                    <footer class="comment-meta">
                        <div class="comment-author">
                            <if condition="$v['img']">
                                <img alt="{$v['nickname']}" src="{$v['img']}" class="avatar avatar-70 photo" style="width: 70px;height: 70px;">
                                <else/>
                                <img alt="{$v['nickname']}" src="__HOME__/images/face.jpg" class="avatar avatar-70 photo" style="width: 70px;height: 70px;">
                            </if>
                            <b class="fn"><a href="javascript:;" rel="external nofollow" class="url">{$v['nickname']}</a></b>
                            <span class="says">说道：</span>
                        </div>

                        <div class="comment-metadata">
                            <a href="javascript:;">
                                <time datetime="{$v['createtime']}">{$v['createtime']}</time>
                            </a>
                        </div>

                    </footer>

                    <div class="comment-content">
                        <p>{:replace_phiz($v['content'])}</p>
                    </div>

                    <div class="reply">
                        <a class="comment-reply-link Noline" href="javascript:;" toUid={$v['uid']} parentId="{$v['id']}" comid="{$v['id']}" level="1" postID="{$v['id']}">回复</a>
                    </div>
                </article>

                <if condition="v.child">
                    <!--第二层 START-->
                    <ol class="children">
                        <foreach name="v.child" item="vv">
                            <li id="comment-{$vv['id']}" class="comment">
                                <article id="div-comment-{$vv['id']}" class="comment-body">
                                    <footer class="comment-meta">
                                        <div class="comment-author">
                                            <if condition="$vv['img']">
                                                <img alt="{$vv['nickname']}" src="{$vv['img']}" class="avatar avatar-70 photo" style="width: 70px;height: 70px;">
                                                <else/>
                                                <img alt="{$vv['nickname']}" src="__HOME__/images/face.jpg" class="avatar avatar-70 photo" style="width: 70px;height: 70px;">
                                            </if>
                                            <b class="fn"><a href="javascript:;" rel="external nofollow" class="url">{$vv['nickname']}</a></b>
                                            <span class="says">回复<span style="margin-left: 7px;">{$vv['toNickname']}</span>：</span>
                                        </div>

                                        <div class="comment-metadata">
                                            <a href="javascript:;">
                                                <time datetime="{$vv['createtime']}">{$vv['createtime']}</time>
                                            </a>
                                        </div>

                                    </footer>

                                    <div class="comment-content">
                                        <p>{:replace_phiz($vv['content'])}</p>
                                    </div>

                                    <div class="reply">
                                        <a class="comment-reply-link Noline" href="javascript:;" toUid={$vv['uid']} parentId="{$vv['parentid']}" comid="{$v['id']}" level="2" postID="{$vv['id']}">回复</a>
                                    </div>

                                </article>
                            </li>

                        </foreach>
                        <span id="show-comment-{$v['id']}"></span>
                    </ol>
                    <!--第二层 END-->
                </if>
            </li>
        </foreach>


    </ol>
    <!--内容展示区域 END-->

    <!--分页区域 START-->
    <if condition="$page && $pg_total gt $pg_limit">
        <div class="pagination" style="margin-bottom: 0px;">
            <div style="float: right">
                {$page}
            </div>
        </div>
    </if>
    <!--分页区域 END-->


    <!--发布内容区域 START-->
    <div id="respond" class="comment-respond">
        <h3 id="reply-title" class="comment-reply-title comment-reply-title-cp" style="cursor: pointer" status="1" uid="{$Think.session.user.uid}"><i class="icon-edit"></i> 欢迎留言 <small><a rel="nofollow" id="cancel-comment-reply-link" href="" style="display:none;">取消回复</a></small></h3>
        <form id="commentform" class="comment-form" style="display: none">
            <script type="text/javascript">
                var sendCommentUrl = "{:U('Comments/send_comment')}";
            </script>
            <!--载入表情库 START-->
            <include file="Public/face"/>
            <!--载入表情库 START-->
            <textarea id="comment" placeholder="赶快发表你的见解吧！" name="comment" cols="45" rows="8"></textarea>
            <p class="form-submit">
                <input name="submit" type="submit" id="submit" value="发表评论">
                <input type="hidden" name="uid" value="{$Think.session.user.uid}" id="uids">
                <input type="hidden" name="parentId" value="0" id="parentId">
                <input type="hidden" name="toUid" value="0" id="toUid">
                <input type="hidden" name="mid" value="0" id="Mid">
                <input type="hidden" name="level" value="0" id="Level">
                <input type="hidden" name="url" value="<?php echo $_SERVER['REQUEST_URI']?>">
                <input type="hidden" name="aid" value="{$Think.get.aid}">
                <input type="hidden" name="post_id" value="0" id="post-id">
            </p>
        </form>
    </div>
    <!--发布内容区域 END-->
</div>